Electronic devices (also referred to herein as “devices”), such as cellular phones, laptops, and tablets, among others, are common in the consumer market. When two users want to exchange information between their electronic devices, the users are usually required to establish a communication channel between the two electronic devices. Some short-range communication protocols like Near-Field Communication (NFC) require the two devices to be extremely close to each other before a data exchange can be initiated. There are a number of ways of detecting proximity. Examples of existing proximity-detection mechanisms include Infrared (IR)-based proximity sensors, ultrasonic sensors, wireless or Bluetooth-based proximity detection, global positioning system (GPS) based proximity detection, and other server-based proximity detection.